import http from "@/utils/http";

/**
 * 获取当前登录账户信息
 * @returns
 */
export const getUserInfoAPI = () => {
  return http.get("/user/userinfo");
};

/**
 * 修改信息
 * @param {*} data
 * @returns
 */
export const updateUserInfoAPI = data => {
  return http.put("/user/update", data);
};

/**
 * 修改头像
 * @param {string} url
 * @returns
 */
export const updateAvatarAPI = url => {
  return http.put("/user/updateAvatar", url);
};

export const updatePasswordAPI = data => {
  return http.put("/user/updatePwd", data);
};
